<h1></h1>
<h3 style="padding-top: 10px;"></h3>
<!--网站导航.搜索条1-->
<div class="header-Nav" style=" height: 30px;">
    <a href="/app/add" class="btn">添加应用</a>
    <form class="bs-docs-example form-inline" style="float:right;margin-right: 30px; margin-top: -40px; text-align: right;" action="<?php echo WEB_DOMAIN; ?>/app" method="POST">
        所属开发者：<input type="text" placeholder="输入开发者账户名" id="appuname" name="seach[appuname]">
        关联人员：<input type="text" placeholder="输入人员号码或名字" id="colname" name="seach[name]"><br>
        <select name="seach[platformid]" class="span2">
            <option value="">全部平台</option>
            <?php if (isset($runType)) foreach ($runType as $key => $vl) { ?>
                    <option value="<?php echo $key; ?>"><?php echo $vl; ?></option>
                <?php } ?>
        </select>&nbsp;
        <select name="seach[classid]" class="span2">
            <option value="">全部分类</option>
            <?php if (isset($runType)) foreach ($runType as $key => $vl) { ?>
                    <option value="<?php echo $key; ?>"><?php echo $vl; ?></option>
                <?php } ?>
        </select>&nbsp;
        <select name="seach[type]" class="span3">
            <option value="">全部状态</option>
            <?php if (isset($runType)) foreach ($runType as $key => $vl) { ?>
                    <option value="<?php echo $key; ?>"><?php echo $vl; ?></option>
                <?php } ?>
        </select>&nbsp;
        <input type="text" placeholder="输入应用名称" id="sname" name="seach[name]">
        <button class="btn" type="submit">搜索</button>
    </form>
</div>
<div class="bs-docs-example">
    <table class="table">
        <thead>
            <tr style="background-color:  ghostwhite;">
                <th>名称</th>
                <th>版本号</th>
                <th>状态</th>
                <th>平台</th>
                <th>分类</th>
                <th>所属开发者</th>
                <th>关联人员</th>
                <th>相关操作</th>
            </tr>
        </thead>
        <tbody>
            <?php
            if (is_array($appData)) {
                foreach ($appData as $vl) {
                    ?>
                    <tr>
                        <td><a href="/app/show/id/<?php echo $vl[id]; ?>"><?php echo $vl[name]; ?></a></td>
                        <td><a href="/app/show/id/<?php echo $vl[id]; ?>"><?php echo $vl[version]; ?></a></td>
                        <td><?php echo $vl[status]; ?></td>
                        <td><?php echo $vl[platformid]; ?></td>
                        <td><?php echo $vl[classid]; ?></td>
                        <td><?php echo $vl[uid]; ?></td>
                        <td><?php echo $runType[$vl["appactive"]]; ?></td>
                        <td>
                            <a class="btn" href="/app/show/id/<?php echo $vl[id]; ?>">查看</a>
                            <a class="btn" href="/app/edit/id/<?php echo $vl[id]; ?>">编辑</a>
                            <a class="btn" href="/app/delete/id/<?php echo $vl[id]; ?>">删除</a>
                            <a class="btn" href="/app/delete/id/<?php echo $vl[id]; ?>">禁止</a><br>
                           <a href="#myModal" role="button" class="btn" data-toggle="modal" onclick="showbox('<?php echo $vl["id"]; ?>','<?php echo $vl["name"]; ?>','<?php echo $vl["servername"]; ?>');">关联人员</a>
                            <a class="btn" href="/app/priority/id/<?php echo $vl[id]; ?>">排期控制</a>
                            <a class="btn" href="/app/effect/id/<?php echo $vl[id]; ?>">效果查看</a>
                            <a class="btn" href="/app/report/id/<?php echo $vl[id]; ?>">查看报表</a>
                        </td>
                    </tr>
                    <?php
                }
            }
            ?>
            <tr>
                <td colspan="3"></td>
                <td colspan="5" style="text-align: right;"><div class="pagination"><ul><?php echo $page; ?></ul></div></td>
            </tr>
    </table>
</div>
<div class="modal" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true" style="display:none;">
    <div class="modal-header">
        <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
        <h3 id="myModalLabel">设置关联人员</h3>
    </div>
    <div class="modal-body">
        <p></p>
        <p>输入人员编号或者姓名：
            <input type="text" placeholder="编号或者姓名" id="assname" name="assname">
            <button class="btn btn-primary">搜索</button>
        </p>
        <p>
         <table class="table">
        <thead>
            <tr style="background-color:  ghostwhite;">
                <th>编号</th>
                <th>姓名</th>
            </tr>
        </thead>
        <tbody>
             <tr><td>编号</td><td>姓名</td></tr>
        </tbody>
        </table>
        </p>
    </div>
    <div class="modal-footer">
        <button class="btn" data-dismiss="modal" aria-hidden="true">关闭</button>
        <button class="btn btn-primary">保存设置</button>
    </div>
</div>
<script src="<?php echo JS_HOST; ?>/js/jquery.copy.js"></script>
<script>
    var clip = null;
    function showbox(sid,str,str1){
        $("#myModalLabel").html(str+"--设置关联人员");
        $("#assname").val( str1 );
    }
</script>